/**
 * @file mtlloader.h
 * @brief MtlLoader class definition
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 3 of the License.
 *
 * @author VestniK (Sergey N.Vidyuk) sir.vestnik@gmail.com
 * @date 23 Aug 2010
 */
#ifndef MJN_MTLLOADER_H
#define MJN_MTLLOADER_H

#include <QtCore/QtGlobal>
#include <QtCore/QString>
#include <QtCore/QCoreApplication>

struct MtlLoaderPrivate;

namespace mjn {

/**
 * @brief Loads *.mtl file and stores materials properties.
 */
class MtlLoader {
    Q_DECLARE_TR_FUNCTIONS(MtlLoader)
    public:
        MtlLoader();
        explicit MtlLoader(const QString &path);
        virtual ~MtlLoader();

        bool load(const QString &path);

        bool valid() const {return mValid;}
        const QString &errorString() const;
        int errorLine() const;
    private:
        Q_DISABLE_COPY(MtlLoader)
        bool mValid;
        MtlLoaderPrivate *const d;
};

}

#endif

